package Num10_20200306;

public class Num10_20200306_hxj {
    public static void main(String[] args) {
        double sum1 = 0, sum2 = 0, hight = 100.0;
        for (int i = 0; i < 10; i++) {
            sum1 = sum1 + hight;
            hight = hight / 2;
            if (i < 9) {
                sum2 = sum2 + hight;
            }
        }
        System.out.println("第10次落地时，共经过" + (sum1 + sum2) + "米");
        System.out.println("第十次反弹高度为" + hight + "米");
    }
}
